import { http } from '@/tool/utils'
import { iPb } from '@/protobuf/interface'

export function ListAttachment(data: iPb.Admin.IListAttachmentRequest):Promise<iPb.Admin.IListAttachmentResponse> {
    return http.post("ListAttachment",iPb.Admin.ListAttachmentRequest.toObject(iPb.Admin.ListAttachmentRequest.create(data)))
}

export function UpdateAttachment(data: iPb.Admin.IUpdateAttachmentRequest):Promise<iPb.Admin.IUpdateAttachmentResponse> {
    return http.post("UpdateAttachment",iPb.Admin.UpdateAttachmentRequest.toObject(iPb.Admin.UpdateAttachmentRequest.create(data)))
}

export function DeleteAttachment(formData: iPb.Admin.IDeleteAttachmentRequest):Promise<iPb.Admin.IDeleteAttachmentResponse> {
    return http.post("DeleteAttachment",iPb.Admin.DeleteAttachmentRequest.create(formData))
}
